function [lhs, rhs] = static_resid(y, x, params)
T = NaN(10, 1);
lhs = NaN(10, 1);
rhs = NaN(10, 1);
T(1) = (params(4)-1)*params(8)*y(1)/y(5);
T(2) = y(2)^(1-y(10));
T(3) = (y(10)-1)^2;
T(4) = T(2)*log(y(2))/(y(10)-1)+(T(2)-1)/T(3);
T(5) = y(2)^(-y(10));
T(6) = y(1)/y(3);
T(7) = y(3)^params(4);
T(8) = y(5)^(1-params(4));
T(9) = params(4)*y(3)^(params(4)-1);
T(10) = y(5)^(-params(4));
lhs(1) = T(1)*T(4);
rhs(1) = params(2)*y(5)^params(7)+(params(4)-1)*y(1)/y(5)*T(5);
lhs(2) = T(5)+params(4)*params(8)*T(4)*params(1)*T(6);
rhs(2) = T(5)*params(1)*(1-params(3)+params(4)*T(6));
lhs(3) = y(10);
rhs(3) = params(6)-params(8)*(y(1)-params(9));
lhs(4) = y(2)+y(4);
rhs(4) = y(1);
lhs(5) = y(1);
rhs(5) = T(7)*exp(y(7))*T(8);
lhs(6) = y(4);
rhs(6) = y(3)-y(3)*(1-params(3));
lhs(7) = y(6);
rhs(7) = y(1)/y(5);
lhs(8) = y(7);
rhs(8) = y(7)*params(5)+x(1);
lhs(9) = y(8);
rhs(9) = T(8)*T(9)-params(3);
lhs(10) = y(9);
rhs(10) = T(7)*(1-params(4))*T(10);
end
